package com.lczyfz.wisdom.modules.platform.constant;

import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

/**
 * Create by css on 2019/9/27
 */
public class Constant {

    private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误
    private static final String SDK_APP_ID_UNUSED  = "1020";  //手机号码格式错误
    /*private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误
    private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误
    private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误
    private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误
    private static final String TEL_NUM_FORM = "1016";  //手机号码格式错误*/


    //获取用户个人信息
    private static final String url = "https://api.weixin.qq.com/cgi-bin/user/info";
    //获取用户微信地址
    public static final String GETWXADDRESS = "https://api.weixin.qq.com/cgi-bin/user/info";


    /**
     * 获取配置文件
     * @return
     */
    public static Properties getProperties(){
        Properties properties = new Properties();
        InputStream inputStream = Constant.class.getClassLoader().getResourceAsStream("/token.properties");
        try {
            properties.load(inputStream);

        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }

    public static void main(String[] args) {
        Properties properties = getProperties();
        Iterator<Map.Entry<Object, Object>> iterator = properties.entrySet().iterator();
        while (iterator.hasNext()){
            Map.Entry<Object, Object> next = iterator.next();
            System.out.println(next.getKey());
            System.out.println(next.getValue());
        }
    }
}
